import request from '@/utils/request'
export default {
  findAll(page,limit,startTime,endTime,siteName,rank) {
    return request({
      url: `/admin/pitfall/cpHitch/findAll/${page}/${limit}/${startTime}/${endTime}/${siteName}/${rank}`,
      method: 'post'
    })
  },

  findChargingStations() {
    return request({
      url: `/admin/pitfall/cpHitch/findChargingStations`,
      method: 'post'
    })
  },

  findCpHandleCode() {
    return request({
      url: `/admin/pitfall/cpHitch/findCpHandleCode`,
      method: 'post'
    })
  },
  findHandlePerson() {
    return request({
      url: `/admin/pitfall/cpHitch/findHandlePerson`,
      method: 'post'
    })
  },
  findHitchById(id) {
    return request({
      url: `/admin/pitfall/cpHitch/findHitchById/${id}`,
      method: 'post'
    })
  },
  updateHitchById(estimate,assContent,person,id) {
    return request({
      url: `/admin/pitfall/cpHitch/updateHitchById/${estimate}/${assContent}/${person}/${id}`,
      method: 'post'
    })
  },
  returnPerson(returnContent,id) {
    return request({
      url: `/admin/pitfall/cpHitch/returnPerson/${returnContent}/${id}`,
      method: 'post'
    })
  },
  isHandle(id) {
    return request({
      url: `/admin/pitfall/cpHitch/isHandle/${id}`,
      method: 'post'
    })
  },
  onUploadRemove(url) {
    return request({
      url: `http://localhost:8130/api/oss/file/removeFile?url=/${url}`,
      method: 'delete'
    })
  },
  dealSave(hitchDeal) {
    return request({
      url: `/admin/pitfall/cpHitch/dealSave`,
      method: 'post',
      data:hitchDeal
    })
  },
  dealTrue(id) {
    return request({
      url: `/admin/pitfall/cpHitch/isDeal/${id}`,
      method: 'post',
    })
  },
  findDealByHitchId(id) {
    return request({
      url: `/admin/pitfall/cpHitch/findDealByHitchId/${id}`,
      method: 'post',
    })
  },
  dealSaveNew(hitchDeal) {
    return request({
      url: `/admin/pitfall/cpHitch/dealSaveNew`,
      method: 'post',
      data:hitchDeal
    })
  },
  fetchDataById(id){
    return request({
      url: `/admin/pitfall/cpHitch/fetchDataById/${id}`,
      method: 'post',
    })
  },
  fetchDataDealById(id){
    return request({
      url: `/admin/pitfall/cpHitch/fetchDataDealById/${id}`,
      method: 'post',
    })
  },
}